@section('meta')
    <style>
        body{background-color: #fff;}
        .modal-content{display: unset;}
    </style>
@endsection
@include('Home.User.Common._meta')
<!----  跟进： test    客户  ---->
<div class="modal-content" id="addNew-content2">
    <div class="layui-form modal-second-info" action="">
        <div class="layui-form-item all-client">
            <div class="selector-title">客户跟进记录表</div>
            <table class="all-client-table">
                <thead>
                <tr>
                    <th class="c-day">跟进时间</th>
                    <th class="c-devp">团队</th>
                    <th class="c-devp">跟进人</th>
                    <th class="c-salary">沟通记录</th>
                    <th class="c-contract">合同细节</th>
                    <th class="c-comm">跟进结果</th>
                    <th class="c-tac">操作</th>
                </tr>
                </thead>
                <tbody>
                @foreach($obj->all_schedule as $v)
                    <tr>
                        <td data-label="跟进时间">{{$v->created_at}}</td>
                        <td data-label="团队">{{$v->team_name}}</td>
                        <td data-label="跟进人">{{$v->user_name}}</td>
                        <td data-label="沟通记录"><p style="width: 130px;height: 60px;overflow: hidden;cursor:crosshair;" title="{{$v->content}}">{{$v->content}}</p></td>
                        <td data-label="合同细节">{{$v->details}}</td>
                        <td data-label="跟进结果">{{$v->schedule_result}}</td>
                        <td data-label="操作" class="tac layui-row layui-col-space10">@if($v->attachment)<a href="{{route('client_schedule_download',$v->id)}}" class="check-btn" target="_blank">查看合同</a>@endif</td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>
    </div>
    {{--超级管理员  ||  创建者  ||  归属者--}}
    @if($obj->permission)
        <form class="layui-form modal-client-info modal-second-info" action="" id="form-user" lay-filter="form-user">
            <div class="modal-func-btns">
                <a href="javascript:;" class="modal-save-btn" onclick="subForm('{{route('add_client_schedule',$obj->id)}}')" title="保存"><i class="icon icon-save"></i></a>
                <a href="javascript:location.replace(location.href);" class="modal-edit-btn" title="重置"><i class="icon icon-edit"></i></a>
            </div>
            @include('Home.User.Common._msg')
            <div class="selector-title" style="margin-bottom: 15px;">新增客户记录</div>
{{--            <div class="layui-form-item">
                <label class="layui-form-label"><span class="red"></span>简历归属</label>
                <div class="layui-input-inline" style="width: 120px;">
                    <input type="text" value="Leader A" class="layui-input fs12 hide-input" disabled>
                </div>
                <div class="layui-input-inline" style="width: 120px;">
                    <input type="text" value="Wendy" class="layui-input fs12 hide-input" disabled>
                </div>
            </div>--}}
            <div class="layui-form-item">
                <label class="layui-form-label"><span class="red">*</span>合同细节</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline">
                        <input type="text" name="details_1" lay-verify="details_1" autocomplete="off" placeholder="填写确定的佣金点，如年薪20%" class="layui-input fs12">
                    </div>
                    <div class="layui-input-inline">
                        <input type="text" name="details_2" lay-verify="details_2" autocomplete="off" placeholder="填写确定的多少薪算年算，如13薪" class="layui-input fs12">
                    </div>
                    <div class="layui-input-inline">
                        <input type="text" name="details_3" lay-verify="details_3" autocomplete="off" placeholder="填写确定回款时间，如15天" class="layui-input fs12">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <div class="layui-input-block">
                    <button type="button" class="layui-btn" id="file_button"><i class="layui-icon"></i>上传合同</button>
                    <span class="layui-word-aux" id="file_preview"></span>
                    <input type="hidden" name="file_id" id="file_id">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">跟进结果</label>
                <div class="layui-input-block">
                    <select name="result" lay-filter="genjin">
                        <option value="1" selected>待沟通</option>
                        <option value="2">有意向，跟进中</option>
                        <option value="3">未签合约</option>
                        <option value="4">已签合同</option>
                        <option value="5">不考虑</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label"><span class="red">*</span>沟通记录</label>
                <div class="layui-input-block">
                    <textarea placeholder="请输入内容" name="content" class="layui-textarea"></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">指定任务归属于</label>
                <div class="layui-input-block">
                    <label for="shareTo">
                        <input type="radio" lay-filter="shareTo" id="shareTo1" name="shareTo" value="1" title="私有" @if($obj->shareTo == 1) checked @endif>
                    </label>
                    <label for="shareTo">
                        <input type="radio" lay-filter="shareTo" id="shareTo2" name="shareTo" value="2"  title="共享全员" @if($obj->shareTo == 2) checked @endif>
                    </label>
                    <label for="shareTo" class="no-margin">
                        <input type="radio" lay-filter="shareTo" id="shareTo3" name="shareTo" title="指派给" value="3" @if($obj->shareTo == 3) checked @endif>
                        <div class="layui-inline">
                            <div class="layui-input-inline" style="width: 160px;">
                                <select lay-filter="assign" id="assign" name="assign">
                                    <option value="0" disabled @if($obj->share || $obj->shareTo == 1 || $obj->shareTo == 2) selected @endif>请选择</option>
                                    @foreach($frame as $item)
                                        @foreach($item as $leader)
                                            <optgroup label="{{$leader->user->username}}">
                                                <option value="{{$leader->uid}}" @if($obj->assign == $leader->uid) selected @endif>{{$leader->user->username}}</option>
                                                @foreach($leader->member as $v)
                                                    <option value="{{$v->uid}}" @if($obj->assign == $v->uid) selected @endif>{{$v->user->username}}</option>
                                                @endforeach
                                            </optgroup>
                                        @endforeach
                                    @endforeach
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-mid layui-word-aux fs12">（若客户{{$customer_day}}天内未开发成功签约会自动变为共享，供其他人可再二次开发)</div>
                    </label>
                </div>
            </div>
        </form>
    @endif

</div>
@section('footer')
    @include('Home.User.Common._assign')
@endsection
@include('Home.User.Common._footer')
@include('Home.User.Common._form')
@section('meta')
    <style>
        body{background-color: #fff;}
        .modal-content{display: unset;}
    </style>
@endsection
@include('Home.User.Common._meta')

